Skip to content

fix: quote ${CLAUDE_PLUGIN_ROOT} in hook commands#13

Open
aidevenanzio-prog wants to merge 1 commit into
morphllm:mainfrom
aidevenanzio-prog:fix/quote-plugin-root-path
Open

fix: quote ${CLAUDE_PLUGIN_ROOT} in hook commands#13
aidevenanzio-prog wants to merge 1 commit into
morphllm:mainfrom
aidevenanzio-prog:fix/quote-plugin-root-path

Conversation

@aidevenanzio-prog

Copy link
Copy Markdown

All four hook commands in hooks/hooks.json interpolate ${CLAUDE_PLUGIN_ROOT} unquoted. When the install path contains a space (e.g. Windows profile dirs like C:\Users\First Last), the POSIX-shell hook runner word-splits the path, node receives a truncated entry path, and every PreCompact/SessionStart/SubagentStart/UserPromptSubmit hook throws MODULE_NOT_FOUND from the cjs loader. Fix: wrap ${CLAUDE_PLUGIN_ROOT} in double quotes in each command string, matching the pattern other Claude Code plugins already use.

Unquoted ${CLAUDE_PLUGIN_ROOT} word-splits in POSIX-shell hook
runners whenever the path contains a space (e.g. Windows user
profile dirs like 'C:\Users\First Last\'). node then receives a
truncated path as its entry module and throws MODULE_NOT_FOUND
from the cjs loader on every PreCompact/SessionStart/SubagentStart/
UserPromptSubmit hook invocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant